package com.yl.chainStore.control.system

import com.yl.chainStore.common.enums.TypeEnum
import com.yl.chainStore.control.BaseCtrl
import com.yl.common.control.ResponseBody
import com.yl.common.control.returnSuccess
import org.springframework.transaction.annotation.Transactional
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

@RestController
@RequestMapping("system/common")
open class SystemCommonController():BaseCtrl() {

	@GetMapping("getGenderSelect")
	@Transactional
	open fun getGenderSelect(): ResponseBody {
		val list = mutableListOf<Map<String, Any>>()
		list.add(TypeEnum.USER_GENDER_BOY.getMap())
		list.add(TypeEnum.USER_GENDER_GIRL.getMap())
		return returnSuccess(list)
	}

	@GetMapping("getUserCardType")
	@Transactional
	open fun getUserCardType(): ResponseBody {
		val list = mutableListOf<Map<String, Any>>()
		list.add(TypeEnum.USER_CARD_TYPE_ID_CARD.getMap())
		list.add(TypeEnum.USER_CARD_TYPE_HK.getMap())
		list.add(TypeEnum.OTHER.getMap())
		return returnSuccess(list)
	}


}
